/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package th.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author fikri
 */
@Entity
@Table(name = "iklan")
@NamedQueries({
    @NamedQuery(name = "Pengiklanan.findAll", query = "SELECT p FROM Pengiklanan p")})
public class Pengiklanan implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id_iklan")
    private Integer idIklan;
    @Column(name = "iklan_ktrgn")
    private String keterangan;
    @Column(name = "aktif")
    private String aktif;
    @Embedded
    private InfoAudit infoAudit;

    public Pengiklanan() {
    }

    public Pengiklanan(Integer idIklan) {
        this.idIklan = idIklan;
    }

    public Integer getIdIklan() {
        return idIklan;
    }

    public void setIdIklan(Integer idIklan) {
        this.idIklan = idIklan;
    }

    public String getKeterangan() {
        return keterangan;
    }

    public void setKeterangan(String keterangan) {
        this.keterangan = keterangan;
    }    

    public String getAktif() {
        return aktif;
    }

    public void setAktif(String aktif) {
        this.aktif = aktif;
    }

    public InfoAudit getInfoAudit() {
        return infoAudit;
    }

    public void setInfoAudit(InfoAudit infoAudit) {
        this.infoAudit = infoAudit;
    }    

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idIklan != null ? idIklan.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Pengiklanan)) {
            return false;
        }
        Pengiklanan other = (Pengiklanan) object;
        if ((this.idIklan == null && other.idIklan != null) || (this.idIklan != null && !this.idIklan.equals(other.idIklan))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "th.model.Pengiklanan[ idIklan=" + idIklan + " ]";
    }
    
}
